package www.bplead.com.mydemo.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log;

import org.greenrobot.eventbus.EventBus;

import roboguice.activity.RoboActivity;

/**
 * Created by wangyangzi on 2016/9/4.
 */
public class BaseActivity extends Activity {

    private String TAG = "BaseActivity";
    public BaseActivity() {
        TAG = this.getClass().getSimpleName();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EventBus.getDefault().register(this);
        Log.v(TAG,"State>>onCreate()");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.v(TAG,"State>>onStart()");
    }

    @Override
    protected void onRestart() {
        super.onRestart();
        Log.v(TAG,"State>>onRestart()");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.v(TAG,"State>>onResume()");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.v(TAG,"State>>onPause()");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.v(TAG,"State>>onStop()");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.v(TAG,"State>>onDestroy()");
        EventBus.getDefault().unregister(this);
    }
}
